package JaggSoft.Utilidades;

import java.awt.event.ActionEvent;
import javax.swing.*;
import javax.swing.table.DefaultTableModel;

public class AccionAbstractaTabla extends AbstractAction {
    private JTable tabla;
    public AccionAbstractaTabla(JTable tabla) {
        this.tabla=tabla;
    }
    @Override
    public void actionPerformed(ActionEvent e) {
        if(this.tabla.getSelectedRow()>-1)
            ((DefaultTableModel)this.tabla.getModel()).removeRow(this.tabla.getSelectedRow());
    }
}